package main
import "fmt"

func main(){
  x:= minFunc(1,3,2,0)
  fmt.Printf("The minimum is: %d\n", x)
  slice := []int{7,9,3,5,1}
  x = minFunc(slice...)
  fmt.Printf("The minimum in the slice is: %d\n",x)
}

func minFunc(s ...int) int {
  if len(s) == 0{
	return 0
  }
  min := s[0]
  for _,v := range s{
	if v < min{
	  min = v
	}
  }
  return min
}
